--スクリプト言語を「AppleScript 英語」にすると快適です(僕の環境では)。 --このTEXT-ttroは丸 雅宏( mmaru@geocities.co.jp )に著作権があります。 --スクリプトは一部分なら真似しても構いません。真似する人がいるかどうかは別として。 --このスクリプトの使用には、システムは漢字Talk 7.5以上で、AppleScriptが使える環境でないと使えません。 --(漢字Talk 7.1.2でも、AppleScriptは使えるようですが、CreatorType Changerは動きません) on open objectList set creatorType to "ttxt" tell application "Finder" repeat with repeatList in objectList if file (repeatList as string) exists then try if file type of repeatList = "ttro" or file type of repeatList = "TEXT" then repeat --ボタン「キャンセル」は、AppleScriptの仕様上、スクリプトが終了する。 display dialog "ファイル「" & name of repeatList & "」のクリエータタイプを決めてください。" buttons {"参照", "キャンセル", "OK"} ツ default button "OK" default answer creatorType if button returned of the result is "参照" then choose file with prompt "クリエータファイルを参照するアプリケーション:" of type {"APPL"} set creatorType to creator type of file (the result as string) else if button returned of the result is "OK" then set creatorType to (text returned of the result) exit repeat end if end repeat set creator type of repeatList to creatorType else display dialog name of repeatList & "はファイルタイプがTEXTまたはttroではありません。" buttons "OK" default button "OK" with icon 2 end if on error errorText number errorNumber if errorNumber ュ -128 then --[-128]のエラーコードはユーザーが「キャンセル」ボタンを押したときである。 display dialog "エラーが起きました。[" & errorText & "] (" & errorNumber & ")" buttons "OK" default button "OK" with icon 2 end if end try else display dialog name of repeatList & "はフォルダのためクリエータタイプを変更することはできません。" buttons "OK" default button "OK" with icon 2 end if end repeat end tell end open